import {
  FromList
} from '../FillIn/queryStatus'
import {
  listArr
} from '../FillIn/screen'




export async function education(data = {}) {
  const a = await listArr()
  const arr = [{
      type: 3,
      name: '入学时间',
      key: 'enrollmentStartDate',
      placeholder: '请选择入学时间',
      rules: {
        message: '请选择入学时间'
      }
    },
    {
      type: 3,
      name: '毕业时间',
      key: 'enrollmentEndDate',
      placeholder: '请选择入学时间',
      rules: {
        message: '请选择入学时间'
      }
    }, {
      type: 1,
      name: '学校名称',
      key: 'schoolName',
      placeholder: '',
      rules: {
        message: '请输入学校名称'
      }
    },
    {
      type: 2,
      name: '学历',
      key: 'educationType',
      placeholder: '请选择学历',
      children: a.educationType,
      rules: {
        message: '请选择学历'
      }
    },
    {
      type: 1,
      name: '学位',
      key: 'academicDegree',
      placeholder: '请输入学位 没有填写无',
      rules: {
        message: '请输入学位'
      }
    },
    {
      type: 1,
      name: '专业',
      key: 'isMajor',
      placeholder: '请输入专业',
      rules: {
        message: '请输入专业'
      }
    },
    {
      type: 2,
      name: '学制',
      key: 'educationalSystem',
      placeholder: '请选择学制',
      children: a.educationalSystem,
      rules: {
        message: '请选择学制'
      }
    },
    {
      type: 2,
      name: '学校类型',
      key: 'schoolType',
      placeholder: '请选择学校类型',
      children: a.schoolType,
      rules: {
        message: '请选择学校类型'
      }
    }, {
      type: 2,
      name: '培养方式',
      key: 'trainType',
      placeholder: '请选择培养方式',
      children: a.trainType,
      rules: {
        message: '请选择培养方式'
      }
    }, {
      type: 1,
      name: '学历证书编号',
      key: 'educationNumber',
      placeholder: '请输入学历证书编号',
      rules: {
        message: '请输入学历证书编号'
      }
    }, {
      type: 1,
      name: '学位证书编号',
      key: 'academicNumber',
      placeholder: '请输入学位证书编号',
      rules: {
        message: '请输入学位证书编号'
      }
    }, {
      type: 2,
      name: '是否全日制',
      key: 'isAll',
      label: '是',
      placeholder: '请选择是否全日制',
      children: a.yeNo,

      rules: {
        message: '请选是否为全日制'
      }
    }, {
      type: 2,
      name: '是否最高',
      key: 'isMaxEducation',
      placeholder: '请选择是否为最高',
      children: a.yeNo,
      rules: {
        message: '请选择是否为最高'
      }
    }, {
      type: 1,
      name: '证明人',
      key: 'witnessName',
      placeholder: '请输入证明人',
      rules: {
        message: '请输入证明人'
      }
    }
  ]
  return arr.map(item => new FromList(item, data))
}

export async function theTitleTechnicalPost(data = {}) {
  const a = await listArr()
  const arr = [{
    type: 3,
    name: '获得日期',
    key: 'acquisitionDate',
    placeholder: '请选择获得日期',
    rules: {
      message: '请选择获得日期'
    }
  }, {
    type: 2,
    name: '获取方式',
    key: 'acquisitionType',
    placeholder: '请选择获取方式',
    children: a.acquisitionType,
    rules: {
      message: '请选择获取方式'
    }
  }, {
    type: 2,
    name: '职称等级',
    key: 'titleGrade',
    placeholder: '请选择职称等级',
    children: a.titleGrade,
    rules: {
      message: '请选择职称等级'
    }
  }, {
    type: 1,
    name: '职称名称',
    key: 'titleName',
    placeholder: '请输入职称名称',
    rules: {
      message: '请输入职称名称'
    }
  }, {
    type: 1,
    name: '证书编码',
    key: 'titleNumber',
    placeholder: '请输入证书编码',
    rules: {
      message: '请输入证书编码'
    }
  }, {
    type: 2,
    name: '是否最高',
    key: 'isTitleMax',
    placeholder: '请选择',
    children: a.yeNo,
    rules: {
      message: '请选择'
    }
  }]
  return arr.map(item => new FromList(item, data))
}

export async function skill(data = {}) {
  const a = await listArr()
  const arr = [{
    type: 3,
    name: '获得日期',
    key: 'skillAcquisitionDate',
    placeholder: '请选择获得日期',
    rules: {
      message: '请选择获得日期'
    }
  }, {
    type: 2,
    name: '获取方式',
    key: 'skillAcquisitionType',
    placeholder: '请选择获取方式',
    children: a.acquisitionType,
    rules: {
      message: '请选择获取方式'
    }
  }, {
    type: 2,
    name: '技能等级',
    key: 'skillGrade',
    placeholder: '请选择技能等级',
    children: a.skillGrade,
    rules: {
      message: '请选择职称等级'
    }
  }, {
    type: 1,
    name: '工种',
    key: 'workType',
    placeholder: '请输入工种',
    rules: {
      message: '请输入工种'
    }
  }, {
    type: 1,
    name: '证书代码',
    key: 'skillNumber',
    placeholder: '请输入证书代码',
    rules: {
      message: '请输入证书代码'
    }
  }, {
    type: 2,
    name: '是否最高',
    key: 'isSkillMax',
    placeholder: '请选择',
    children: a.yeNo,
    rules: {
      message: '请选择'
    }
  }]
  return arr.map(item => new FromList(item, data))
}